home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / ghostMethods.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.7 KB  |  57 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. #include "gl.h"
  22. #include "geom.h"
  23. #include "class.h"
  24. #include "selectors.h"
  25. #include "classIds.h"
  26. #include "mbox.h"
  27. #include "individual.h"
  28. #include "behavior.h"
  29. #include "colors.h"
  30. #include "pick.h"
  31. #include "doers.h"
  32. #include "panel.h"
  33. #include "valuator.h"
  34. #include "objIds.h"
  35.  
  36. extern subscr *findvars();
  37. extern individual *replicateModel();
  38. extern individual *us;
  39. extern behavior faderTemplate;
  40. extern int dumper;
  41.  
  42.     /*
  43.      *  instantiate and initialize a ghost's model list
  44.      *  and give it its default behavior.
  45.      */
  46.     individual *
  47. initGhost(self)
  48.     register individual *self;
  49. {
  50.     /* reproduce list of model segments */
  51.     replicateModel(self);
  52.     /* subscribe to default behavior */
  53.     subscribe(&faderTemplate, self);
  54.  
  55.     return self;
  56. }
  57.